<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let p=new Promise((resolve,reject)=>{
            reject()
            // resolve()
        })
        //链式调用
        p.then(()=>{
            console.log('成功');
        }).catch(()=>{
            console.log('失败');
        })
    </script>
</body>
</html>